package pogo;

import java.util.Random;
import java.util.Scanner;

public class Computer {
    String name="小智";
    int score=0;

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    //    出拳
    public int chuQuan(){
        Random random=new Random();
        int i=random.nextInt(3)+1;//因为是从0 开始的所以要加1
        if(i==1){
            System.out.println("人机出的是石头");
        }else if(i==2){
            System.out.println("人机出的是剪刀");
        }else if(i==3){
            System.out.println("人机出的是布");
        }else{
            i=0;
            System.out.println("人机出拳错误");
        }
        return i;
    }
}
